<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page import="com.myapp.actions.visit.GetVisit"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="mwt" tagdir="/WEB-INF/tags/" %>
<%@taglib prefix="mw" uri="/WEB-INF/tlds/myweb" %>
<mw:action action="<%=new GetVisit()%>" result="result"/>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  <head>
    <title>CliniQ</title>
    <%@include file="/commons/head.jsp" %>
    <link rel="stylesheet" href="${path}/css/vendor/datepicker.css">
  </head>
  <body>
    <%@include file="/commons/navbar.jsp" %>
    <div class="container">
      <form id="visit-detail" class="form-horizontal">
        <input type="hidden" name="id" id="id" value="${result.id}">
        <input type="hidden" name="clientId" id="clientId" value="${result.client.id}">
        <div class="control-group">
          <label class="control-label" for="clientName">Client</label>
          <div class="controls">
            <div class="input-append">
              <input type="text" id="clientName" placeholder="Client" readonly="readonly" 
                     value="${result.client.lastName}, ${result.client.firstName}">
              <a id="visit-client-search" href="#client-search-modal" role="button" class="btn" data-toggle="modal">Search</a>
              <a id="visit-client-add" href="#client-add-modal" role="button" class="btn" data-toggle="modal">New</a>
            </div>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">Visit Time</label>
          <div class="controls">
            <span><fmt:formatDate timeZone="${user.timeZoneObj}" value="${result.visitTime}" pattern="yyyy-MM-dd / HH:mm"/></span>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="reasonForConsult">Reason for Consult</label>
          <div class="controls">
            <textarea id="reasonForConsult" name="reasonForConsult" placeholder="Reason for Consult">${result.reasonForConsult}</textarea>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="historyOfPresentIllness">History of Present Illness</label>
          <div class="controls">
            <textarea id="historyOfPresentIllness" name="historyOfPresentIllness" placeholder="History of Present Illness">${result.historyOfPresentIllness}</textarea>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="subjective">Subjective</label>
          <div class="controls">
            <textarea id="subjective" name="subjective" placeholder="Subjective">${result.subjective}</textarea>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="objective">Objective</label>
          <div class="controls">
            <textarea id="objective" name="objective" placeholder="Objective">${result.objective}</textarea>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="assessment">Assessment</label>
          <div class="controls">
            <textarea id="assessment" name="assessment" placeholder="Assessment">${result.assessment}</textarea>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="plan">Plan</label>
          <div class="controls">
            <textarea id="plan" name="plan" placeholder="Plan">${result.plan}</textarea>
          </div>
        </div>
        <div class="control-group">
          <div class="controls">
            <input type="submit" class="btn" value="Update" />
            <input type="button" class="btn" id="visit-delete-btn" value="Delete" />
          </div>
        </div>
      </form>
    </div>
    <%@include file="/commons/footer.jsp" %>
    <script src="${path}/js/vendor/bootstrap-datepicker.js"></script>
  </body>
</html>

